package com.ruoyi.base.api;

import com.ruoyi.base.api.domain.Account;
import com.ruoyi.base.api.factory.AccountFallbackFactory;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "AccountService", value = ServiceNameConstants.BASE_SERVICE, fallbackFactory = AccountFallbackFactory.class)
public interface AccountService {

    @PutMapping("/account")
    public AjaxResult edit(@RequestBody Account account);

    @GetMapping(value = "/account/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

}
